<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    //1. Object.is 判断两个是否完全相等;
    //console.log(Object.is(120, 120));
    //console.log(Object.is(NaN, NaN));
    //2.Obiect.aggin 对象的合并;
    const config1={
    host:'localhost',
    part:2334,
    name:'root',
    pass:'eoot'

};
//获取对象所有的健;
//console.log(Object.keys(config1));
//[ "host", "part", "name", "pass" ]
//获取对象所有的值;
//console.log(Object.values(config1));
// [ "localhost", 2334, "root", "eoot" ]
//entries;
//console.log(Object.entries(config1));
//[ (2) […], (2) […], (2) […], (2) […] ]
//创建 Map;
const m = new Map(Object.entries(config1));
console.log(m.get('host'));
//localhost
//对象属性的描述对象;
console.log(Object.getOwnPropertyDescriptors(config1));


const config2 ={
    host: 'hattp://ww.qd.com',
    port:330,
    name:"jjjnk.com",
    pass:"ilove"
}
//第二个属性覆盖第一个;
console.log(Object.assign(config1,config2));

    </script>
</body>
</html>